Returns a string that contains the inner text of the tag with an HTML element ID.
To get a variable that contains the text, use the ExtractHTMLToString statement.
Syntax
HTMLFindByID("HTMLText", "HTMLElementID")
Arguments
| Argument | Description |
|---|---|
| HTMLText | HTML inner text or value. |
| HTMLElementID | HTML element ID. |
Return value
| Value | Description |
|---|---|
| Value | Inner text string from the HTML element. |
Example
htmlText = Window("Thank You").ExtractHTMLToString()
ticketNum = HTMLFindByID(htmlText, "ticket")
If ticketNum = "" Then
Fail("Cannot find ticket number")
Else
PrintLn("Ticket number: " & ticketNum)
End If